package org.example.service.impl;

import org.example.dao.BookDao;
import org.example.dao.impl.BookDaoImpl;
import org.example.service.BookService;

public class BookServiceImpl implements BookService {
    // 解耦:不直接指定bookDao的实现类,而是通过setter方法注入
    private BookDao bookDao;

    public void save() {
        System.out.println("book service save ...");
        bookDao.save();
    }
    //setter
    public void setBookDao(BookDao bookDao) {
        this.bookDao = bookDao;
    }
}